package com.yzr.common.thread.function;

import java.util.function.Consumer;

/**
 * 四大函数式接口
 * 消费者接口，只接收参数，没有返回值
 */
public class ConsumerDemo {
    public static void main(String[] args) {
        /*Consumer<String> stringConsumer = new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        };*/
        Consumer<String> consumer = System.out::println;
        consumer.accept("uzr");

    }
}
